#pragma once
/*
 * variadic template function.
 */
#include <functional>

namespace anet {
    namespace utils {
        template <typename RET, typename... ARGS>
        class CVariadicFunc {
        public:
            typedef std::function<RET(ARGS...)> Functor;

        public:
            CVariadicFunc(Functor func) : m_func(std::move(func)) {
            }
            virtual ~CVariadicFunc() = default;

        public:
            RET call(ARGS &&...args) {
                return m_func(args...);
            }

        private:
            Functor m_func;
        };
    }
}